home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / bin / get_mountoptions < prev    next >
Text File  |  2009-01-11  |  337b  |  23 lines

  1. #!/bin/sh
  2.  
  3. . /usr/share/debconf/confmodule
  4.  
  5. dev=$1
  6. id=$2
  7. part=$dev/$id
  8. filesystem=$(cat $part/acting_filesystem)
  9.  
  10. cd $dev
  11.  
  12. options=''
  13. for op in $(cat /lib/partman/mountoptions/$filesystem); do
  14.     if [ -f $part/options/$op ]; then
  15.         options="${options:+$options,}$op"
  16.     fi
  17. done
  18. if [ -z "$options" ]; then
  19.     options=defaults
  20. fi
  21.  
  22. echo $options
  23.